Learn R Programming

MXM (version 0.9.4)

Plot of longitudinal data: Plot of longitudinal data

Description

Plot of longitudinal data.

Usage

tc.plot(target, tp, id, type = "l", ylab = "Values", xlab = "Time points", col = 2, lwd = 1, lty = 2, pch = 1)

Arguments

target
A numerical vector with the longitudinal data.
tp
The time points. It can either be a vector with length either equal to the number of time points or equal to the legnth of the target.
id
A numerical vector specifying the subjects. It can either be a vector with length either equal to the number of subjects or equal to the legnth of the target.
type
This is a graphical parameter. You can have lines "l" everywhere or lines with points at each time point "p".
ylab
This is a graphical parameter. The label on the y axis.
xlab
This is a graphical parameter. The label on the x axis.
col
This is a graphical parameter. The color of the lines.
lwd
This is a graphical parameter. The thickness of the lines.
lty
This is a graphical parameter. The type of line, e.g. dashed, dotted, etc.
pch
This is a graphical parameter. If the type is "b", then you can specify if you want different signs, for example circles, crosses, diamonds etc.

Value

A plot with the longitudinal data over time.

Details

The data must be longitudinal (the same subject measured multiple times at different time points) and for one variable only. For the graphical parameters see plot or par.

References

Tsamardinos I., Aliferis C. F. and Statnikov, A. (2003). Time and sample efficient discovery of Markov blankets and direct causal relations. In Proceedings of the 9th ACM SIGKDD international conference on Knowledge discovery and data mining (pp. 673-678).

See Also

testIndGLMM,

Examples

Run this code
## require(lme4)
## data(sleepstudy)
## attach(sleepstudy)
## tc.plot(Reaction, Days, Subject)
## tc.plot(Reaction, Days, Subject, type = "b")

Run the code above in your browser using DataLab